global_defs {
   router_id LVS_DEVEL
}

vrrp_script chk_ngx {
    script "/etc/keepalived/check_nginx.sh"
    interval 2
    weight -5
    fall 3  
    rise 2
}


vrrp_instance VI_1 {
    interface {{ vip_interface }}
    state MASTER
    priority 100
    virtual_router_id {{ keepalived_virtual_router_id }}
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }

#    unicast_src_ip 192.168.0.100

#    unicast_peer {
#        192.168.0.101
#    }

    virtual_ipaddress {
        {{ cluster_vip  }}
    }

    track_script {
       chk_ngx
    }
    notify_master "/etc/keepalived/notify.sh master"  
    notify_backup "/etc/keepalived/notify.sh backup"  
    notify_fault "/etc/keepalived/notify.sh fault"
}